From a3262243ca01f7cfe3ae86b168d5b3a7e5d1cbc0 Mon Sep 17 00:00:00 2001
From: Balint Reczey <balint.reczey@canonical.com>
Date: Thu, 28 Nov 2019 19:31:12 +0100
Subject: [PATCH] Drop MPI 1 support

Signed-off-by: Balint Reczey <balint.reczey@canonical.com>
---
 mpi/libmpiwrap.c | 16 ++--------------
 1 file changed, 2 insertions(+), 14 deletions(-)

diff --git a/mpi/libmpiwrap.c b/mpi/libmpiwrap.c
index 488bb13fd..a740ea562 100644
--- a/mpi/libmpiwrap.c
+++ b/mpi/libmpiwrap.c
@@ -278,8 +278,6 @@ static void showTy ( FILE* f, MPI_Datatype ty )
    else if (ty == MPI_LONG_INT)       fprintf(f,"LONG_INT");
    else if (ty == MPI_SHORT_INT)      fprintf(f,"SHORT_INT");
    else if (ty == MPI_2INT)           fprintf(f,"2INT");
-   else if (ty == MPI_UB)             fprintf(f,"UB");
-   else if (ty == MPI_LB)             fprintf(f,"LB");
 #  if defined(MPI_WCHAR)
    else if (ty == MPI_WCHAR)          fprintf(f,"WCHAR");
 #  endif
@@ -350,20 +348,11 @@ static void showCombiner ( FILE* f, int combiner )
 #     endif
       case MPI_COMBINER_CONTIGUOUS:  fprintf(f, "CONTIGUOUS"); break;
       case MPI_COMBINER_VECTOR:      fprintf(f, "VECTOR"); break;
-#if   defined(MPI_COMBINER_HVECTOR_INTEGER)
-      case MPI_COMBINER_HVECTOR_INTEGER: fprintf(f, "HVECTOR_INTEGER"); break;
-#     endif
       case MPI_COMBINER_HVECTOR:     fprintf(f, "HVECTOR"); break;
       case MPI_COMBINER_INDEXED:     fprintf(f, "INDEXED"); break;
-#if   defined(MPI_COMBINER_HINDEXED_INTEGER)
-      case MPI_COMBINER_HINDEXED_INTEGER: fprintf(f, "HINDEXED_INTEGER"); break;
-#     endif
       case MPI_COMBINER_HINDEXED:    fprintf(f, "HINDEXED"); break;
 #if   defined(MPI_COMBINER_INDEXED_BLOCK)
       case MPI_COMBINER_INDEXED_BLOCK: fprintf(f, "INDEXED_BLOCK"); break;
-#     endif
-#if   defined(MPI_COMBINER_STRUCT_INTEGER)
-      case MPI_COMBINER_STRUCT_INTEGER: fprintf(f, "STRUCT_INTEGER"); break;
 #     endif
       case MPI_COMBINER_STRUCT:      fprintf(f, "STRUCT"); break;
 #if   defined(MPI_COMBINER_SUBARRAY)
@@ -458,8 +447,9 @@ Bool isMSI ( MPI_Status* status )
 static long extentOfTy ( MPI_Datatype ty )
 {
    int      r;
+   MPI_Aint lb;
    MPI_Aint n;
-   r = PMPI_Type_extent(ty, &n);
+   r = MPI_Type_get_extent(ty, &lb, &n);
    assert(r == MPI_SUCCESS);
    return (long)n;
 }
@@ -733,8 +723,6 @@ void walk_type ( void(*f)(void*,long), char* base, MPI_Datatype ty )
          f(base + offsetof(Ty,loc), sizeof(int));
          return;
       }
-      if (ty == MPI_LB || ty == MPI_UB)
-         return; /* have zero size, so nothing needs to be done */
       goto unhandled;
       /*NOTREACHED*/
    }
-- 
2.17.1

